From 5c235ad67a49579e00c22dc242f82f4b3c4ddf38 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Thu, 29 Mar 2012 04:56:04 +0800 Subject: [PATCH] Enable CPPFLAGS hardening flags (Closes: #665322); Better explanation for the -c option arguments of opencc (Closes: #656201) --- debian/changelog | 3 +++ debian/patches/more_clear_man_c_option.patch | 20 ++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 3 +++ 4 files changed, 27 insertions(+) create mode 100644 debian/patches/more_clear_man_c_option.patch diff --git a/debian/changelog b/debian/changelog index 3027f42..410d07e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ opencc (0.3.0-2) unstable; urgency=low * Add libopencc-dbg package. * Bump standard version to 3.9.3. * Add YunQiang Su to Uploaders. + * Enable CPPFLAGS hardening flags (Closes: #665322). + * Better explanation for the -c option arguments of opencc, + give the path of these files out. (Closes: #656201). -- YunQiang Su Thu, 29 Mar 2012 03:22:51 +0800 diff --git a/debian/patches/more_clear_man_c_option.patch b/debian/patches/more_clear_man_c_option.patch new file mode 100644 index 0000000..06005ff --- /dev/null +++ b/debian/patches/more_clear_man_c_option.patch @@ -0,0 +1,20 @@ +Description: Clear the path of config_file /usr/bin/opencc + Give out the path of config_file: /usr/lib/${DEB_HOST_MULTIARCH}/opencc/*.ini +Author: Kan-Ru Chen , YunQiang Su + +Index: opencc/doc/opencc.1 +=================================================================== +--- opencc.orig/doc/opencc.1 2012-03-29 04:35:59.000000000 +0800 ++++ opencc/doc/opencc.1 2012-03-29 04:38:50.720283041 +0800 +@@ -16,6 +16,11 @@ + \fB\-c\fR + Load dictionary configuration from config_file. + .IP ++Package libopencc1 has some configuration file preset: /usr/lib/${DEB_HOST_MULTIARCH}/opencc/*.ini; ++the ${DEB_HOST_MULTIARCH} is something like "x86_64-linux-gnu" (AMD64) ++or "i386-linux-gnu" (i386), or something else; ++you can get it by `dpkg-architecture \-qDEB_HOST_MULTIARCH`. ++.IP + Note: + .IP + Text from standard input will be read if input_file is not set and will be written to standard output if output_file is not set. diff --git a/debian/patches/series b/debian/patches/series index fb650d8..58ca48e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ +more_clear_man_c_option.patch fix-new-test-cases.patch diff --git a/debian/rules b/debian/rules index 69a6c8a..3a15a81 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,9 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk +# CMake doesn't use CPPFLAGS, pass them to CFLAGS/CXXFLAGS to enable the +# missing (hardening) flags. +CFLAGS += $(CPPFLAGS) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -- 2.30.2